package com.itheima.crops.feign;

import com.itheima.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(name = "crops")
public interface PcropsFeign {
    /**
     * 农作物全查
     * @return
     */
    @GetMapping("/pcrops/findAll")
    public Result findAll();

    /**
     * 农作物根据id查询基本信息
     * @param id
     * @return
     */
    @GetMapping("/pcrops/findById1/{id}")
    public Result findById1(@PathVariable("id") Integer id);

    /**
     * 查农作物与指标关联关系
     * @param id 农作物id
     * @return
     */
    @GetMapping("/pcrops/pcropsIndexInfoList/{id}")
    public Result pcropsIndexInfoList(@PathVariable("id") Integer id);
}
